package cn.sccdlg.spring5aop;

import cn.sccdlg.spring5aop.service.IAccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author RaoShuang
 * @emil 991207823@qq.com
 * @date 2020/10/20 22:41
 * 测试aop的通知类型设置
 */
public class AOPTest2 {

    public static void main(String[] args) {
        //1.获取容器
        ApplicationContext ac = new ClassPathXmlApplicationContext("bean2.xml");
        //2.获取对象
        IAccountService as = (IAccountService)ac.getBean("accountService");
        //3.执行方法
        as.saveAccount();
    }
}
